home *** CD-ROM | disk | FTP | other *** search
/ Interactive Quarterly / The Best of New Machine Publishing 1 - Disc 4: Interactive Quarterly.iso / pc / xtras / pomlite.dir / Documentation_7.txt < prev    next >
Encoding:
Text File  |  1996-10-06  |  1.2 KB  |  26 lines

  1. new
  2.  
  3. Syntax: set doc = new(xtra "PrintOMatic_Lite")
  4.  
  5. The new command is used to create a new instance of the PrintOMatic Lite  Xtra. The newly created instance is called a document object, since it represents a printable "document": a collection of items that are printed together in a single print job by PrintOMatic Lite. 
  6.  
  7. Once the document object has been created, its settings can be modified, items can be appended to the document, and it can be printed or displayed in a print preview window.
  8.  
  9. Important Note:
  10.  
  11. new will return an error code instead of a document object if there is no currently selected printer, or a printing error occurs. Always check the result of new with the objectP() function to make sure you have a valid Xtra instance before continuing!
  12.  
  13. Example:
  14.  
  15. The following code example creates a new document, sets the page orientation to landscape mode, appends an image with a caption to the document, and prints the document:
  16.  
  17.     set doc = new(xtra "PrintOMatic_Lite")
  18.     if not objectP(doc) then exit
  19.     setLandscapeMode doc, TRUE
  20.     append doc, member "picture"
  21.     append doc, RETURN & "Image printed by the PrintOMatic Lite Xtra."
  22.     if doJobSetup (doc) = TRUE then print doc
  23.     set doc = 0
  24.  
  25.  
  26.